{section name="mydata" loop=$custid}
{if $smarty.section.mydata.first}
<table border="1" width="50%" cellpadding="8" cellspacing="0">
  <tr style="background-color:#000000;color:#ffffff;">
    <th>id</th>
    <th>name</th>
    <th>mail</th>
  </tr>
{/if}
  <tr style="background-color:{cycle values="#ffffff,#cccccc"};">
    <td>{$custid[mydata]}</td>
    <td>{$name[mydata]}</td>
    <td>{$address[mydata]}</td>
  </tr>
{if $smarty.section.mydata.last}</table>{/if}
{/section}